home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / MacPerl5 / MPEditions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-22  |  2.9 KB  |  114 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPEditions.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPEditions.h,v $
  12. Revision 1.1  1994/02/27  23:03:07  neeri
  13. Initial revision
  14.  
  15. Revision 0.2  1993/09/16  00:00:00  neeri
  16. Runtime doesn't support Editions
  17.  
  18. Revision 0.1  1993/05/29  00:00:00  neeri
  19. Compiles correctly
  20.  
  21. *********************************************************************/
  22.  
  23. #include <Types.h>
  24. #include <QuickDraw.h>
  25. #include <Files.h>
  26. #include <Packages.h>
  27. #include <GestaltEqu.h>
  28. #include <Editions.h>
  29. #include <Printing.h>
  30.  
  31. #ifndef __MPEDITIONS__
  32. #define __MPEDITIONS__
  33.  
  34. #include "MPGlobals.h"
  35. #include "MPUtils.h"
  36.  
  37. pascal void AddSection(SectHandle newSection, DPtr aDocument);
  38.  
  39. pascal void CreateSection(SectionHandle   EMSection,
  40.                                                   short           sectionID,
  41.                                                   short           theStart,
  42.                                                   short           theEnd,
  43.                                                   DPtr            aDocument,
  44.                                                   RgnHandle       theBorder);
  45.  
  46. pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
  47.  
  48. pascal void AssocAllSections(DPtr theDoc);
  49.  
  50. /*routines for writing out and reading in section resources*/
  51. /*rAliasType and rSectionType resources*/
  52.  
  53. pascal void ReadAllSectionResources(DPtr  aDoc);
  54.  
  55. pascal void ReadSectionRecords(DPtr  aDoc);
  56.  
  57. pascal void ReadASection(SectHandle  aSectHandle);
  58.  
  59. pascal void SaveASection(SectHandle aSection, short count);
  60.  
  61. pascal void SaveSections(DPtr aDocument);
  62.  
  63. /*routines for writing out editions*/
  64.  
  65. pascal void ReadAnEdition(SectionHandle mySectHdl);
  66.  
  67. pascal void WriteAllEditions(DPtr aDocument);
  68.  
  69. pascal void WriteAnEdition(SectionHandle mySectHdl);
  70.  
  71. /*routines for handling the section borders*/
  72.  
  73. pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
  74.  
  75. pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
  76.  
  77. pascal void SetSelectionRgn(TEHandle  theTEHandle,
  78.                             short     posStart,
  79.                                                         short     posEnd,
  80.                                                         RgnHandle    *theSelRgn);
  81.  
  82. pascal void ShowSectionBorders(DPtr aDoc);
  83.  
  84. pascal void DoTEPasteSectionRecalc(DPtr theDoc);
  85.  
  86. pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
  87.  
  88. pascal void DoTECutSectionRecalc(DPtr theDoc);
  89.  
  90. pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
  91.  
  92. /*utility routines*/
  93.  
  94. pascal SectHandle GetERefCon(SectionHandle EMSection);
  95.  
  96. pascal void SetERefCon(SectionHandle  EMSection, SectHandle aSectHandle);
  97.  
  98. pascal void DeRegisterAllSections(DPtr aDoc);
  99.  
  100. pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
  101.  
  102. /*now the routines for dealing with the user interface issues*/
  103.  
  104. pascal void DoSectionOptions(DPtr theDoc);
  105.  
  106. pascal void DoSubscribe(DPtr theDoc);
  107.  
  108. pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
  109.  
  110. pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
  111.  
  112. pascal Boolean KeyOKinSubscriber(char whatKey);
  113.  
  114. #endif